#include "head.h"

int main(int argc, char **argv)
{
    int opt;
    while ((opt = getopt(argc, argv, "alm:o::")) != -1)  {
        switch(opt) {
            case 'a':
                printf("a found\n");
                break;
            case 'l':
                printf("l found\n");
                break;
            case 'm':
                printf("m found\n");
                printf("msg: %s\n", optarg);
                break;
            case 'o':
                printf("o found\n");
                printf("opt: %s\n", optarg);
                break;
            default:
                fprintf(stderr, "Usage: %s -al\n", argv[0]);
                break;
        }
    }
    return 0;
}